home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_128 / mrbackup / mrbackup.txt < prev    next >
Text File  |  1992-05-06  |  14KB  |  397 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.           
  8.           
  9.           
  10.           
  11.           
  12.           
  13.           
  14.           
  15.           
  16.           
  17.                                 MRBackup Version 1.3
  18.           
  19.                              A Hard Disk Backup Utility
  20.                                        for the
  21.                                    Commodore Amiga
  22.           
  23.           
  24.                                   24 September 1987
  25.           
  26.                                Author: Mark R. Rinfret
  27.                                
  28.           
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.           
  74.           
  75.           Introduction
  76.           
  77.                This document describes  a  program  which  will  back up an
  78.           Amiga hard disk drive to floppy  disk  media.  It also represents
  79.           the author's first serious (are you kidding?) attempt to write an
  80.           Amiga program with an Intuition-based user interface.
  81.           
  82.                MRBackup is  reasonably  flexible,  allowing  you to back up
  83.           individual directories, directory trees or a whole disk.  You can
  84.           backup from  one  directory  hierarchy  and  restore  to another.
  85.           Incremental backups can be  performed  based on file modification
  86.           dates.  Just for fun, MRBackup also talks.  Though this is mostly
  87.           frivolous, the speech  capability  provides a method for alerting
  88.           you that a new output disk is required for formatting.
  89.           
  90.                MRBackup is not fast.  When  choosing  a  method for packing
  91.           the backup data, a  fast-scan  approach  with  specialized backup
  92.           directory  structure  was   considered.   However,  there  is  an
  93.           inherent danger in  committing  multiple  files  to a specialized
  94.           file system which can only be  accessed  through a solitary piece
  95.           of software.  I decided  to  maintain  the  AmigaDOS  file system
  96.           structure which has a  great  deal  of  integrity  and allows the
  97.           backup media to be accessed by standard software. 
  98.           
  99.                The user should take a serious and organized approach to his 
  100.           backup methods, however.  I highly recommend that backup listings
  101.           be kept in a safe  place  (I  use  a  3-ring  binder)  and backup
  102.           floppies be stored safe  from  magnetic  damage  or other hazards
  103.           (like spilled coffee - argh!).  A truly committed individual will
  104.           backup his entire disk once a  month,  once  a week and "areas of
  105.           interest" once  a  day  (default).   One  shortcoming(?)  of  the
  106.           current version of MRBackup is that  all directory nodes from the
  107.           specified home path and down  are  preserved on the backup media,
  108.           even if some of those nodes have no  files eligible for backup by
  109.           way of the backup date.  Perhaps a  later version of this program
  110.           will address this issue.
  111.           
  112.                MRBackup attempts to  economize  on  output  media  usage by
  113.           using data compression/decompression (at the cost of time).  This
  114.           is an option which can be  enabled/disabled  via  menu selection.
  115.           The compression routine used was lifted  from the Un*x "compress"
  116.           program but has been  adapted  to  employ  buffering and AmigaDOS
  117.           I/O. 
  118.           
  119.           
  120.           Operation
  121.           
  122.                To use MRBackup, click on the program  icon or type MRBackup
  123.           at the CLI prompt.  A new window will  open in which you will see
  124.           a STOP sign and a couple  of  embedded  windows.   The  "Pathname
  125.           Specifications" window is where  you  tell MRBackup where data is
  126.           coming from and going  to.   It  is  important  to  note that the
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           meanings of "Home Path" and  "Backup  Path" remain the same for a
  140.           backup or a restore operation.   That  is, the "Home Path" always
  141.           refers to the hard disk pathname and  "Backup Path" always refers
  142.           to the floppy disk pathname.   The  "Listing  Path" refers to the
  143.           destination of a detailed  listing  of the contents of the backup
  144.           floppies and may specify the  printer  (default) or a file on the
  145.           hard   disk.    The   listing   is   an   option   which  may  be
  146.           enabled/disabled via  menu  selection.   The  "Exclude  Path", if
  147.           specified, is the name of a  file  which  contains a list of file
  148.           specifications, with possible Unix-style  wildcard content, which
  149.           are checked during backup against  the names of files about to be
  150.           backed up.  Any filename  matching  an entry in this list will be
  151.           excluded from the backup.   The  exclude  file  consists  of file
  152.           specifications, one per line,  or  comments (a line with a number
  153.           sign  - # - in column 1).   Blank  lines  are ignored.  Also, the
  154.           specifications  are  case-insensitive.   That  is,  "SYSTEM"  and
  155.           "system" are equivalent.  Examples:
  156.           
  157.           # Exclude all object files
  158.           *.o
  159.           # Exclude all files beginning with "System":
  160.           system*
  161.           # Exclude all ".info" files:
  162.           *.info
  163.           # Exlude the "include" directory and all subdirectories:
  164.           include
  165.           
  166.                You can customize the operation of  MRBackup through the use
  167.           of   an   initialization   file.    This   file   must  be  named
  168.           S:MRBackup.init.  With it, you may  set your desired defaults and
  169.           Flags.  Each line in the file  consists  of an option setting, of
  170.           the form:
  171.           
  172.           OPTION = VALUE
  173.           
  174.           or a comment.  Comment lines begin with a number/pound/libra sign
  175.           (#).  A sample initialization file  is included which illustrates
  176.           the use of all possible parameter settings.
  177.           
  178.           
  179.           Backing Up a Disk
  180.           
  181.                To back up your hard disk, or a section  of it, first get an
  182.           indication of the size of the  area  with  the Info command, "ls"
  183.           (if you have it), List, etc.  If you multiply the total number of
  184.           bytes (blocks * 512) by 0.65,  then  divide by 800000, you should
  185.           get a very rough estimate (probably high) of the number of floppy
  186.           disks required to back up that  area.   The floppies selected for
  187.           backup need not be preformatted, as  MRBackup will format them as
  188.           needed.  You should  be  sure,  however,  that  no  valuable data
  189.           exists on them since  it  will  be  destroyed  by  the formatting
  190.           process. 
  191.           
  192.                Once your floppies  are  ready  and  stacked  neatly  within
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.           reach, the fun begins.  First, modify the pathname specifications
  206.           according to  your  requirements.   The  "Home  Path" may include
  207.           device names DH0..DH9 (depending upon your configuration) and may
  208.           optionally specify a directory  component,  as well.  If only the
  209.           device name is specified, all  files  on the drive will be backed
  210.           up.  If a directory is  specified,  the backup will be limited to
  211.           all files and subdirectories at or  below that level.  The backup
  212.           path should be  the  DEVICE  name  of  one  of your floppy drives
  213.           (DF0..DF3 are the  allowed  values  here).   Finally, the listing
  214.           path may be set to the printer device  (PRT:) or to the name of a
  215.           file on a hard drive or any available floppy drive not being used
  216.           by the backup.  The listing  path  will be ignored if you set the
  217.           No Listing option in the Flags menu.
  218.           
  219.                Make sure that you have set the desired options in the Flags
  220.           menu, then select Backup  from  the  Project  menu.   You will be
  221.           prompted with a  date  requester.   The  default  date value that
  222.           appears is one day  earlier  than  the  current date.  If that is
  223.           satisfactory, simply depress  the  RETURN key and the backup will
  224.           commence.  If you desire to change  the date, edit the date value
  225.           as necessary, using  the  standard  Amiga  conventions.  Remember
  226.           that to clear the gadget  you  may  press  right-Amiga-x.  A date
  227.           value of 00/00/00 or a null string  is allowed should you want to
  228.           backup all files in the home  path,  regardless of their creation
  229.           dates.  Otherwise, the required date  and time format is MM/DD/YY
  230.           HH:MM:SS (24 hour clock), the time specification being optional.  
  231.           
  232.                You will notice upward and downward  pointing "arrows" above
  233.           each date component.   Clicking  on  the  appropriate  arrow will
  234.           increment or  decrement  the  respective  portion  of  the  date.
  235.           Though the  values  normally  will  wrap  around,  not  affecting
  236.           adjacent date  components,  certain  situations  will arise where
  237.           incrementing a  day  value  may  cause  the  month  to  increment
  238.           (incrementing February 28 in  a  non-leap-year  will  yield March
  239.           31).  I just didn't feel  the  extra  logic  was  worth it (I got
  240.           lazy).
  241.           
  242.                Once  the  date  has  been  entered,   the  rest  is  fairly
  243.           automatic.  You will be  prompted  immediately for a blank floppy
  244.           disk.  Insert it into the floppy drive  that you specified in the
  245.           backup path and the disk requester will be satisfied.  Should you
  246.           want to abort, simply hit  the  CANCEL  gadget  in the requester.
  247.           Also, you may abort the backup process at any time by hitting the
  248.           STOP gadget which appears  in  the  top  left area of the screen.
  249.           This gadget is only checked  prior  to the start of the next file
  250.           copy operation, so be patient if it does not respond immediately.
  251.           
  252.                As each floppy disk is filled, you should promptly label it.
  253.           MRBackup automatically generates volume names of the form:
  254.           
  255.                Backup MM-DD-YY.<sequence number>
  256.           
  257.           Also to be noted is the fact  that  the files on the backup media
  258.           retain the creation/modification date (I wish they were distinct)
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.           of their counterparts on the home device.
  272.           
  273.                You will find  that  the  Amiga's  multitasking  environment
  274.           shines when using this program.  For those long-haul backups, get
  275.           everything started, then shove all the windows to the back and go
  276.           start something  useful.   MRBackup  will  carry  on without your
  277.           watchful eye.  When it needs a disk,  the disk requester will pop
  278.           out in front of everything and  MRBackup  will  ask (out loud, if
  279.           you allow it) for another disk.  Having something else to do will 
  280.           make the time pass faster.
  281.           
  282.           
  283.           Restoring the Backups
  284.           
  285.                No, this isn't always the bad part.   Backup and restore can
  286.           also be useful when your  hard  disk  is  crowded and you have to
  287.           "juggle" data around.  The restoration  process is quite similar,
  288.           mechanically, to the  backup  process  -  it's just reversed.  In
  289.           addition, the meanings of the pathname specifications are altered
  290.           somewhat.  The "Home  path"  describes  the  destination  for the
  291.           restored files and, as with the  backup  process, may specify the
  292.           hard drive only or a directory specification.   The "Backup path"
  293.           describes the file  or  files  to  be  restored  and  thus may be
  294.           defined down to the file level (1 file).
  295.           
  296.                Note that on a restore operation,  the file creation date of
  297.           the backup file is compared to  its  matching file (if it exists)
  298.           on the home device.  If the file on the home device is newer, the
  299.           file will not be replaced.  If  this  is desired, the file on the
  300.           home device must  be  deleted  first.   A  later  version of this
  301.           program will probably offer  a  "force"  or  "force  with prompt"
  302.           option.  
  303.           
  304.           
  305.           Warranties
  306.           
  307.                There are no warranties, either  expressed  or implied, with
  308.           regard to the use of this  program.   You  didn't pay for it (did
  309.           you?), so how you gonna' get  you  money  back?  Seriously, folk,
  310.           I've tested this beastie fairly thoroughly (I intend to USE it!),
  311.           but you know  how  things  go...there  may  be  a  bugaboo or two
  312.           lurking in there.  Please exercise  it a little before committing
  313.           your life (your precious data) to its care.
  314.           
  315.           
  316.           Permissions
  317.           
  318.                This program is contributed to the public domain, as a token 
  319.           of gratitude for the  many  wonderful  programs  I  have received
  320.           through the same channels.  Feel free  to enhance, destroy, sell,
  321.           distribute  or  otherwise  benefit  from  the  legal  use of this
  322.           program.  I would love to hear  from  those  of you who find this
  323.           either useful or useless (with specific  criticisms in the latter
  324.           case).  If you make any  enhancements  (there's room for PLENTY),
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.           please share them with me and  the  rest  of the world.  I can be
  338.           reached as:
  339.           
  340.                mark@unisec.USI.COM (at least a couple more months)
  341.           
  342.                or
  343.           
  344.                Mark R. Rinfret
  345.                348 Indian Avenue
  346.                Portsmouth, RI 02871
  347.                401-846-7639 (home)
  348.                401-849-4174 (work)
  349.           
  350.           
  351.           
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.